package com.lhy.wanandroid.ui.login

import androidx.lifecycle.MutableLiveData
import com.lhy.wanandroid.base.BaseViewModel
import com.xiaojianjun.wanandroid.model.bean.UserInfo

class LoginViewModel:BaseViewModel() {
    val loginBean=MutableLiveData<UserInfo>()
    val loginRepository by lazy { LoginRepository() }

    fun login(username: String, password: String){
        launchOnMain(

                block = {
                    val result= loginRepository.login(username,password)

                    loginBean.value=result

                }
        )
    }
}